home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bipl.zip / DATA.ZIP / IHELP.DAT < prev    next >
Text File  |  1992-09-20  |  31KB  |  1,038 lines

  1. Icon Programming Language Version 8.6 Help Summaries
  2.  
  3.     Help summaries are available for each of the Icon executable
  4.     programs (icont, iconx), and for many aspects of the Icon
  5.     language itself.    
  6.  
  7.     To see the help summaries, enter one of the following commands:
  8.     
  9.     ihelp icont            # Icon translator & linker
  10.     ihelp iconx            # Icon interpreter
  11.  
  12.     ihelp expressions        # summary of expressions & precedence
  13.     ihelp functions        # summary of functions
  14.     ihelp operations        # summary of operations
  15.     ihelp keywords        # list of keywords
  16.     ihelp datatypes        # list of Icon datatypes
  17.     ihelp reserved        # list of reserved words
  18.     ihelp escapes        # list of string escape sequences
  19.     ihelp abbreviations        # abbreviations used in help files
  20.     ihelp <function name>    # information on specific function
  21.     ihelp about            # bibliography and credits for help file
  22.  
  23. -
  24. abs(N) : N                # compute absolute value
  25.  
  26. Produces the absolute value of N.
  27. -
  28. acos(r1) : r2                # compute arc cosine
  29.  
  30. Produces the arc cosine of r1 in the range of 0 to pi for r1 in the
  31. range of -1 to 1.
  32. -
  33. any(c,s,i1,i2) : i3            # locate initial character
  34.  
  35. Succeeds and produces i1 + 1 if s[i1] is in c and i2 > i1, but fails
  36. otherwise.
  37.  
  38. Defaults:
  39. s    &subject
  40. i1    &pos if s defaulted, otherwise 1
  41. i2    0 
  42. -
  43. args(p) : i                # get number of procedure arguments
  44.  
  45. Produces the number of arguments for procedure p.  For built-in
  46. procedures with a variable number of arguments, the value produced is
  47.  -1.  For declared procedures with a variable number of arguments, the
  48. value returned is the negative of the number of formal prameters.
  49. -
  50. bal(c1,c2,c3,s,i1,i2) : i3,i4,...,in    # locate balanced characters
  51.  
  52. Generates the sequence of integer positions in s preceding a character
  53. of c1 in s[i1:i2] that is balanced with respect to the characters of c2
  54. and c3, but fails if there is no such position.
  55.  
  56. Defaults:
  57. c1    &cset
  58. c2    '('
  59. c3    ')'
  60. s    &subject
  61. i1    &pos if s defaulted, otherwise 1
  62. i2    0 
  63. -
  64. callout(x,x1,x2,...,xn) : xm        # call external function
  65.  
  66. Calls the external function specified by x with arguments x1, x2, ...,
  67. xn.  The mechanism for locating the function specified by x is system
  68. dependent.
  69. -
  70. center(s1,i,s2) : s3            # position string at center
  71.  
  72. Produces a string of size i in which s1 is centered, with s2 used for
  73. padding at left and right as necessary.
  74.  
  75. Defaults:
  76. i    1
  77. s2    " " (blank)
  78. -
  79. char(i) : s                # produce character
  80.  
  81. Produces a string of length 1 consisting of the character whose
  82. internal representation is i.
  83. -
  84. chdir(s) : n                # change directory
  85.  
  86. Changes the directory to s but fails if there is no such directory
  87. or if the change cannot be made.
  88. -
  89. close(f) : f                # close file
  90.  
  91. Produces f after closing it unless f was opened with the pipe ("p")
  92. option, in which case the integer exit status of the command is
  93. returned.
  94. -
  95. collect(i1,i2) : n            # perform garbage collection
  96.  
  97. Causes a garbage collectionin region i1, requesting i2 bytes of space
  98. in that region.  It fails if the requested space is not available.  The
  99. regions are identified as follows:
  100.  
  101.     1    Static region
  102.     2    String region
  103.     3    Block region
  104.  
  105. If i1 is 0, a collection is done, but no region is identified and i2
  106. has no effect.  The value of i2 is ignored for the static region.
  107.  
  108. Defaults:
  109. i1    0
  110. i2    0
  111. -
  112. copy(x1) : x2                # copy value
  113.  
  114. Produces a copy of x1 if x1 is a structure; otherwise it produces x1.
  115. -
  116. cos(r1) : r2                # compute cosine
  117.  
  118. Produces the cosine of r1 in radians.
  119. -
  120. cset(x)                    # convert to cset
  121.  
  122. Produces a cset resulting from converting x, but fails if the
  123. conversion is not possible.
  124. -
  125. delay(i) : n                # delay execution
  126.  
  127. Delays execution i milliseconds.
  128. -
  129. delete(X,x) : X                # delete element
  130.  
  131. If X is a set, deletes x from X.  If X is a table, deletes the element
  132. for key x from X.  Produces X.
  133. -
  134. detab(s1,i1,i2,...,in) : s2        # remove tabs
  135.  
  136. Produces a string based on s1 in which each tab character is replaced
  137. by one or more blanks.  Tab stops are at i1, i2, ..., in, with
  138. additional stops obtained by repeating the last interval.
  139.  
  140. Default:
  141. i1    9
  142. -
  143. display(i,f) : n            # display variables
  144.  
  145. Writes the image of the current co-expression and the values of the
  146. local variables in the current procedure call.  If i > 0, the local
  147. variables in the i preceding procedure calls are displayed as well.
  148. After all local variables are displayed, the values of global variables
  149. are displayed.  Output is written to f.
  150.  
  151. Defaults:
  152. i    &level
  153. f    &errout
  154. -
  155. dtor(r1) : r2                # convert degrees to radians
  156.  
  157. Produces the radian equivalent of r1 given in degrees.
  158. -
  159. entab(s1,i1,i2,...,in) : s2        # insert tabs
  160.  
  161. Produces a string based on s1 in which runs of blanks are replaced by
  162. tabs.  Tab stops are at i1, i2, ..., in, with additional stops obtained
  163. by repeating the last interval.
  164.  
  165. Default:
  166. i1    9
  167. -
  168. errorclear() : n            # clear error indication
  169.  
  170. Clears the indications of the last error.
  171. -
  172. exit(i)                    # exit program
  173.  
  174. Terminates the program with exit status i.
  175.  
  176. Default:
  177. i    normal exit (system dependent)
  178. -
  179. exp(r1) : r2                # compute exponential
  180.  
  181. Produces e raised to the power r1.
  182. -
  183. find(s1,s2,i1,i2) : i3,i4,...,in    # find string
  184.  
  185. Generates the sequence of integer positions in s2 at which s1 occurs as
  186. a substring in s2[i1:i2], but fails if there is no such position.
  187.  
  188. Defaults:
  189. s2    &subject
  190. i1    &pos if s2 defaulted, otherwise 1
  191. i2    0 
  192. -
  193. flush(f) : n                # flush I/O buffer
  194.  
  195. Flushes the input/output buffers for f.
  196. -
  197. function() : s1,s2,...,sn        # generate function names
  198.  
  199. Generates the names of the Icon (built-in) functions.
  200. -
  201. get(L) : x                # get value from list
  202.  
  203. Produces the leftmost element of L and removes it from L, but fails if
  204. L is empty; synonym for pop(L).
  205. -
  206. getenv(s1) : s2                # get value of environment variable
  207.  
  208. Produces the value of environment variable s1, but fails if the
  209. variable is not set or environment variables are not supported.
  210. -
  211. iand(i1,i2) : i3            # compute bit-wise "and"
  212.  
  213. Produces the bitwise "and" of i1 and i2.
  214. -
  215. icom(i1) : i2                # compute bit-wise complement
  216.  
  217. Produces the bitwise complement (1's complement) of i1.
  218. -
  219. image(x) : s                # produce string image
  220.  
  221. Produces a string image of x.
  222. -
  223. insert(X,x1,x2) : X            # insert element
  224.  
  225. If X is a table, inserts the key x1 with value x2 into X.  If X is a
  226. set, inserts x1 into X.  Produces X.
  227.  
  228. Default:
  229. x2    &null
  230. -
  231. integer(x) : i                # convert to integer
  232.  
  233. Produces the integer resulting from converting x, but fails if the
  234. conversion is not possible.
  235. -
  236. ior(i1,i2) : i3                # compute bit-wise inclusive "or"
  237.  
  238. Produces the bitwise inclusive "or" of i1 and i2
  239. -
  240. ishift(i1,i2) : i3            # shift bits
  241.  
  242. Produces the result of shifting the bits in i1 by i2 positions.
  243. Positive values of i2 shift to the left, negative to the right.
  244. Vacated bit positions are zero-filled.
  245. -
  246. ixor(i1,i2) : i3            # compute bit-wise exclusive "or"
  247.  
  248. Produces the bitwise exclusive "or" of i1 and i2.
  249. -
  250. key(T) : x1,x2,...,xn            # generate keys from table
  251.  
  252. Generates the keys in table T.
  253. -
  254. left(s1,i,s2) : s3            # position string at left
  255.  
  256. Produces a string of size i in which s1 is positioned at the left, with
  257. s2 used for padding on the right as necessary.
  258.  
  259. Defaults:
  260. i    1
  261. s2    " " (blank)
  262. -
  263. list(i,x) : L                # create list
  264.  
  265. Produces a list of size i in which each value is x.
  266.  
  267. Defaults:
  268. i    0
  269. x    &null
  270. -
  271. log(r1,r2) : r3                # compute logarithm
  272.  
  273. Produces the logarithm of r1 to the base r2.
  274.  
  275. Default:
  276. r2    e
  277. -
  278. many(c,s,i1,i2) : i3            # locate many characters
  279.  
  280. Succeeds and produces the position in s after the longest initial sequence
  281. of characters in c in s[i1:i2].  It fails if s[i1] is not in c.
  282.  
  283. Defaults:
  284. s    &subject
  285. i1    &pos if s defaulted, otherwise 1
  286. i2    0 
  287. -
  288. map(s1,s2,s3) : s4            # map characters
  289.  
  290. Produces a string of size *s1 obtained by mapping characters of s1 that
  291. occur in s2 into corresponding characters in s3.
  292.  
  293. Defaults:
  294. s2    string(&ucase)
  295. s3    string(&lcase)
  296. -
  297. match(s1,s2,i1,i2) : i3            # match initial string
  298.  
  299. Produces i1 + *s1 if s1 == s2[i1+:*s1], but fails otherwise.
  300.  
  301. Defaults:
  302. s2    &subject
  303. i1    &pos if s2 defaulted, otherwise 1
  304. i2    0 
  305. -
  306. member(X,x) : x                # test for membership
  307.  
  308. If X is a set, succeeds if x is a member of X, but fails otherwise.  If
  309. X is a table, succeeds if x is a key of an element in X, but fails
  310. otherwise.  Produces x if it succeeds.
  311. -
  312. mmout(x) : n                # write text to allocation history
  313.  
  314. Writes s to the allocation history file.  s is given no
  315. interpretation.
  316. -
  317. mmpause(s) : n                # write pause to allocation history
  318.  
  319. Writes s to the allocation history file as a pause point with
  320. identification s.
  321.  
  322. Default:
  323. s    "programmed pause"
  324. -
  325. mmshow(x,s) : n                # redraw in allocation history
  326.  
  327. Specifies redrawing of x in the allocation history file.  The color is
  328. defined by s as follows:
  329.  
  330.     "b"    black
  331.     "g"    gray
  332.     "w"    white
  333.     "h"    highlight; blinking black and white if possible
  334.     "r"    normal color
  335.  
  336. If x is not in an allocated region, has no effect.
  337.  
  338. Default:
  339. s    "r"
  340. -
  341. move(i) : s                # move scanning position
  342.  
  343. Produces &subject[&pos:&pos + i] and assigns i + &pos to &pos, but
  344. fails if i is out of range; reverses assignment to &pos if resumed.
  345. -
  346. name(x) : s                # produce name
  347.  
  348. Produces the name of the variable x.  If x is an identifier or a
  349. keyword that is a variable, the name of the identifier or keyword is
  350. produced.  If x is a record field reference, the record name and field
  351. name are produced with a separating period.  If x is a string, the name
  352. of the string and the subscript range are shown.  If x is a subscripted
  353. list or table, the type name followed by the subscripting expression is
  354. produced.
  355. -
  356. numeric(x) : N                # convert to numeric
  357.  
  358. Produces an integer or real number resulting from converting x, but
  359. fails if the conversion is not possible.
  360. -
  361. open(s1,s2) : f                # open file
  362.  
  363. Produces a file resulting from opening s1 according to options in s2,
  364. but fails if the file cannot be opened.  The options are:
  365.  
  366.     "r"    open for reading
  367.     "w"    open for writing
  368.     "a"    open for writing in append mode
  369.     "b"    open for reading and writing
  370.     "c"    create
  371.     "t"    translate line termination sequences to linefeeds
  372.     "u"    do not translate line termination sequences to linefeeds
  373.     "p"    pipe to/from a command -- UNIX
  374.  
  375. The default mode is to translate line termination sequences to
  376. linefeeds on input and conversely on output.  The untranslated mode
  377. should be used when reading and writing binary files.
  378.  
  379. Default:
  380. s2    "rt"
  381. -
  382. ord(s) : i                # produce ordinal
  383.  
  384. Produces an integer (ordinal) between 0 and 255 that is the internal
  385. representation of the single character in s.
  386. -
  387. pop(L) : x                # pop from list
  388.  
  389. Produces the leftmost element of L and removes it from L, but fails if
  390. L is empty; synonym for get(L).
  391. -
  392. pos(i1) : i2                # test scanning position
  393.  
  394. Produces &pos if &pos = i1, but fails otherwise.
  395. -
  396. proc(x,i) : p                # convert to procedure
  397.  
  398. Produces a procedure corresponding to the value of x, but fails if x
  399. does not correspond to a procedure.  If x is the string name of an
  400. operator, i specifies the number of arguments: 1 for unary (prefix), 2
  401. for binary (infix), and 3 for ternary.
  402.  
  403. Default:
  404. i    1
  405. -
  406. pull(L) : x                # pull from list
  407.  
  408. Produces the rightmost element of L and removes it from L, but fails if
  409. L is empty.
  410. -
  411. push(L,x) : L                # push onto list
  412.  
  413. Adds x to the left end of L and produces L.
  414. -
  415. put(L,x) : L                # put onto list
  416.  
  417. Adds x to the right end of L and produces L.
  418. -
  419. read(f) : s                # read line
  420.  
  421. Produces the next line from f, but fails on end of file.
  422.  
  423. Default:
  424. f    &input
  425. -
  426. reads(f,i) : s                # read string
  427.  
  428. Produces a string consisting of the next i characters from f, or the
  429. remaining characters of f if fewer remain, but fails on an end of
  430. file.  In reads(), unlike read(), line termination sequences have no
  431. special significance.  reads() should be used for reading binary data.
  432.  
  433. Defaults:
  434. f    &input
  435. i    1
  436. -
  437. real(x) : r                # convert to real
  438.  
  439. Produces a real number resulting from type conversion of x, but fails
  440. if the conversion is not possible.
  441. -
  442. remove(s) : n                # remove file
  443.  
  444. Removes (deletes) the file named s, but fails if s cannot be removed.
  445. -
  446. rename(s1,s2) : n            # rename file
  447.  
  448. Renames the file named s1 to be s2, but fails if the renaming cannot be
  449. done.
  450. -
  451. repl(s1,i) : s2                # replicate string
  452.  
  453. Produces a string consisting of i concatenations of s1.
  454. -
  455. reverse(s1) : s2            # reverse string
  456.  
  457. Produces a string consisting of the reversal of s.
  458. -
  459. right(s1,i,s2) : s3            # position string at right
  460.  
  461. Produces a string of size i in which s1 is positioned at the right, with
  462. s2 used for padding on the left as necessary.
  463.  
  464. Defaults:
  465. i    1
  466. s2    " " (blank)
  467. -
  468. rtod(r1) : r2                # convert radians to degrees
  469.  
  470. Produces the degree equivalent of r1 given in radians.
  471. -
  472. runerr(i,x)                # terminate with run-time error
  473.  
  474. Terminates program execution with error i and offending value x.
  475.  
  476. Default:
  477. x    no offending value
  478. -
  479. save(s) : i                # save executable image
  480.  
  481. Saves an executable image of the current running program in the file
  482. named s and produces the size of the file, but fails if the file cannot
  483. be created.
  484. -
  485. seek(f,i) : f                # seek to position in file
  486.  
  487. Seeks to position i in f, but fails if the seek cannot be performed.
  488. The first byte in the file is at position 1.  seek(f,0) seeks to the
  489. end of file f.
  490. -
  491. seq(i1,i2) : i3,i4,...            # generate sequence of integers
  492.  
  493. Generates an endless sequence of integers starting at i1 with
  494. increments of i2.
  495.  
  496. Defaults:
  497. i1    1
  498. i2    1
  499. -
  500. set(L) : S                # create set
  501.  
  502. Produces a set whose members are the distinct values in the list L.
  503.  
  504. Default:
  505. L    []
  506. -
  507. sin(r1) : r2                # compute sine
  508.  
  509. Produces the sine of r1 given in radians.
  510. -
  511. sort(X,i) : L                # sort structure
  512.  
  513. Produces a list containing values from X.  If X is a list or a set,
  514. sort(X,i) produces the values of X in sorted order.  If X is a table,
  515. sort(X,i)produces a list obtained by sorting the elements of X,
  516. depending on the value of i.  For Produces a list according to i:
  517.  
  518. i = (1 | 2)     Produces a list of two-element lists of key/value pairs
  519.         from X; ordered by keys for i = 1, by values for i =
  520.         2.
  521. i = (3 | 4)    Produces a list of size 2 * *X with each consecutive
  522.         pair of elements consisting of a key and a value from
  523.         X; ordered by keys for i = 3, by values for i = 4.
  524.  
  525. Default:
  526. i    1
  527. -
  528. sortf(X,i) : L                # sort list or set by field
  529.  
  530. Produces a sorted list of the values in X.  Sorting is primarily by
  531. type and in most respects is the same as with sort(X,i).  However,
  532. among lists and among records, two structures are ordered by comparing
  533. their ith fields.  i can be negative but not zero.  Two structures
  534. having the equal ith fields are ordered as they would be in regular
  535. sorting, but structures lacking an ith field appear before structures
  536. having them.
  537.  
  538. Default:
  539. i    1
  540. -
  541. sqrt(r1) : r2                # compute square root
  542.  
  543. Produces the square root of r1.
  544. -
  545. stop(x1,x2,...,xn)            # stop execution
  546.  
  547. Terminates program execution with an error status after writing strings
  548. x1,x2,...,xn.  If xi is a file, subsequent output is to xi.  Initial
  549. output is to standard error output.
  550.  
  551. Default:
  552. xi    "" (empty string)
  553. -
  554. string(x) : s                # convert to string
  555.  
  556. Produces a string resulting from converting x, but fails if the
  557. conversion is not possible.
  558. -
  559. system(s) : i                # call system function
  560.  
  561. Calls the C library function "system" to execute s and produces the
  562. resulting integer exit status.
  563. -
  564. tab(i) : s                # set scanning position
  565.  
  566. Produces &subject[&pos:i] and assigns i to &pos, but fails if i is out
  567. of range.  It reverses assignment to &pos if resumed.
  568. -
  569. table(x) : T                # create table
  570.  
  571. Produces a table with a default value x.
  572.  
  573. Default:
  574. x    &null
  575. -
  576. tan(r1) : r2                # compute tangent
  577.  
  578. Produces the tangent of r1 given in radians.
  579. -
  580. trim(s1,c) : s2                # trim string
  581.  
  582. Produces a string consisting of the characters of s1 up to the trailing
  583. characters contained in c.
  584.  
  585. Default:
  586. c    ' ' (blank)
  587. -
  588. type(x) : s                # produce type name
  589.  
  590. Produces a string corresponding to the type of x.
  591. -
  592. upto(c,s,i1,i2) : i3,i4,...,in        # locate characters
  593.  
  594. Generates the sequence of integer positions in s preceding a character
  595. of c in s[i1:i2].  It fails if there is no such position.
  596.  
  597. Defaults:
  598. s    &subject
  599. i1    &pos if s defaulted, otherwise 1
  600. i2    0 
  601. -
  602. variable(s) : x                # produce variable
  603.  
  604. Produces the variable for the identifier or keyword named s, but fails
  605. if there is no such variable.  Local identifiers override global
  606. identifiers.
  607. -
  608. where(f) : i                # produce position in file
  609.  
  610. Produces the current byte position in f.  The first byte in the file is
  611. at position 1.
  612. -
  613. write(x1,x2,...,xn) : xn        # write line
  614.  
  615. Writes strings x1,x2,...,xn with a line termination sequence added at
  616. the end.  If xi is a file, subsequent output is to xi.  Initial output
  617. is to standard output.
  618.  
  619. Default:
  620. xi    "" (empty string)
  621. -
  622. writes(x1,x2,...,xn)            # write string
  623.  
  624. Writes strings x1,x2,...,xn without a line termination sequence added
  625. at the end.  If xi is a file, subsequent output is to xi.  Initial
  626. output is to standard output.
  627.  
  628. Default:
  629. xi    "" (empty string)
  630. -
  631. icont -- Icon translator and linker
  632.  
  633. icont [option...] file...
  634.     -c                # translate only (no link)
  635.     -o file            # name icode file "file"
  636.     -s                # suppress progress messages
  637.     -t                # give &trace initial value of -1
  638.     -u                # issue warnings for undeclared identifiers
  639.  
  640. See also:
  641.     ihelp iconx
  642. -
  643. iconx -- Icon interpreter
  644.  
  645. The Icon interpreter is normally invoked automatically when the name of
  646. an Icon program is entered as a command, but it can be invoked
  647. explicitly, too.
  648.  
  649. iconx icode_file_name [arguments for Icon program.]
  650.  
  651.  
  652.  
  653.     Shell environment variables recognized by iconx
  654.     ===============================================
  655.     Name    Default     Description
  656.     --------    -------     -----------------------
  657.     TRACE    0        Initial value for &trace.
  658.     NOERRBUF    undefined   If set, &errout is not buffered.
  659.     STRSIZE    65000        Initial size (bytes) of string region
  660.                 (strings).
  661.     BLOCKSIZE    65000        Initial size (bytes) of block region
  662.                 (most objects).
  663.     COEXPSIZE    2000        Size (long words) of co-expression blocks.
  664.     MSTKSIZE    10000        Size (long words) of main interpreter stack.
  665.     STATSIZE    20480        Initial size (bytes) of static region
  666.                 (co-expression blocks).
  667.     STATINCR    1/4 of        Increment used to expand static region.
  668.         STATSIZE
  669.  
  670.  
  671. See also:
  672.     ihelp icont
  673. -
  674. Expressions shown in order of decreasing precedence.  Items in groups
  675. (as separated by empty lines) have equal precedence.
  676.  
  677. High Precedence Expressions
  678.  
  679.     (expr)            # grouping
  680.     {expr1;expr2;...}        # compound
  681.     x(expr1,expr2,...)        # invocation
  682.     x{expr1,expr2,...}        # "
  683.     [expr1,expr2,...]        # list
  684.     expr.F            # field reference
  685.     expr1[expr2]        # subscript
  686.     expr1[expr2:expr3]        # section
  687.     expr1[expr2+:expr3]        # "
  688.     expr1[expr2-:expr3]        # "
  689.  
  690. Prefix Expressions
  691.  
  692.     not    expr            # success/failure reversal
  693.     | expr            # repeated alternation
  694.     ! expr            # element generation
  695.     * expr            # size
  696.     + expr            # numeric value
  697.     - expr            # negative
  698.     . expr            # value (dereference)
  699.     / expr            # null
  700.     \ expr            # non-null
  701.     = expr            # match and tab
  702.     ? expr            # random value
  703.     ~ expr            # cset complement
  704.     @ expr            # activation
  705.     ^ expr            # refresh
  706.  
  707. Infix Expressions
  708.  
  709.     expr1 \ expr2        # limitation
  710.     expr1 @ expr2        # transmission
  711.     expr1 ! expr2        # invocation
  712.  
  713.     expr1 ^ expr2        # power
  714.  
  715.     expr1 * expr2        # product
  716.     expr1 / expr2        # quotient
  717.     expr1 % expr2        # remainder
  718.     expr1 ** expr2        # intersection
  719.  
  720.     expr1 + expr2        # sum
  721.     expr1 - expr2        # numeric difference
  722.  
  723.     expr1 ++ expr2        # union
  724.     expr1 -- expr2        # cset or set difference
  725.  
  726.     expr1 || expr2        # string concatenation
  727.     expr1 ||| expr2        # list concatenation
  728.  
  729.     expr1 < expr2        # numeric comparison
  730.     expr1 <= expr2        # "
  731.     expr1 = expr2        # "
  732.     expr1 >= expr2        # "
  733.     expr1 > expr2        # "
  734.     expr1 ~= expr2        # "
  735.     expr1 << expr2        # string comparison
  736.     expr1 <<= expr2        # "
  737.     expr1 == expr2        # "
  738.     expr1 >>= expr2        # "
  739.     expr1 >> expr2        # "
  740.     expr1 ~== expr2        # "
  741.     expr1 === expr2        # value comparison
  742.     expr1 ~=== expr2        # "
  743.  
  744.     expr1 | expr2        # alternation
  745.  
  746.     expr1 to expr2 by expr3    # integer generation
  747.  
  748.     expr1 := expr2        # assignment
  749.     expr1 <- expr2        # reversible assignment
  750.     expr1 :=: expr2        # exchange
  751.     expr1 <-> expr2        # reversible exchange
  752.     expr1 op:= expr2        # (augmented assignments)
  753.  
  754.     expr1 ? expr2        # string scanning
  755.  
  756.     expr1 & expr2        # conjunction
  757.  
  758. Low Precedence Expressions
  759.  
  760.     break [expr]               # break from loop
  761.     case expr0 of {            # case selection
  762.        expr1:expr2
  763.        ...
  764.        [default:exprn]
  765.        }
  766.     create expr                # co-expression creation
  767.     every expr1 [do expr2]        # iterate over generated values
  768.     fail                # failure of procedure
  769.     if expr1 then exp2 [else exp3]  # if-then-else
  770.     next                # go to top of loop
  771.     repeat expr                # loop
  772.     return expr                # return from procedure
  773.     suspend expr1 [do expr2]        # suspension of procedure
  774.     until expr1 [do expr2]        # until-loop
  775.     while expr1 [do expr2]        # while-loop
  776. -
  777. Functions and datatypes of arguments and produced values:
  778.  
  779. abs(N) : N                # compute absolute value
  780. acos(r1) : r2                # compute arc cosine
  781. any(c,s,i1,i2) : i3            # locate initial character
  782. args(p) : i                # get number of procedure arguments
  783. bal(c1,c2,c3,s,i1,i2) : i3,i4,...,in    # locate balanced characters
  784. callout(x,x1,x2,...,xn) : xm        # call external function
  785. center(s1,i,s2) : s3            # position string at center
  786. char(i) : s                # produce character
  787. chdir(s) : n                # change directory
  788. close(f) : f                # close file
  789. collect(i1,i2) : n            # perform garbage collection
  790. copy(x1) : x2                # copy value
  791. cos(r1) : r2                # compute cosine
  792. cset(x)                    # convert to cset
  793. delay(i) : n                # delay execution
  794. delete(X,x) : X                # delete element
  795. detab(s1,i1,i2,...,in) : s2        # remove tabs
  796. display(i,f) : n            # display variables
  797. dtor(r1) : r2                # convert degrees to radians
  798. entab(s1,i1,i2,...,in) : s2        # insert tabs
  799. errorclear() : n            # clear error indication
  800. exit(i)                    # exit program
  801. exp(r1) : r2                # compute exponential
  802. find(s1,s2,i1,i2) : i3,i4,...,in    # find string
  803. flush(f) : n                # flush I/O buffer
  804. function() : s1,s2,...,sn        # generate function names
  805. get(L) : x                # get value from list
  806. getenv(s1) : s2                # get value of environment variable
  807. iand(i1,i2) : i3            # compute bit-wise "and"
  808. icom(i1) : i2                # compute bit-wise complement
  809. image(x) : s                # produce string image
  810. insert(X,x1,x2) : X            # insert element
  811. integer(x) : i                # convert to integer
  812. ior(i1,i2) : i3                # compute bit-wise inclusive "or"
  813. ishift(i1,i2) : i3            # shift bits
  814. ixor(i1,i2) : i3            # compute bit-wise exclusive "or"
  815. key(T) : x1,x2,...,xn            # generate keys from table
  816. left(s1,i,s2) : s3            # position string at left
  817. list(i,x) : L                # create list
  818. log(r1,r2) : r3                # compute logarithm
  819. many(c,s,i1,i2) : i3            # locate many characters
  820. map(s1,s2,s3) : s4            # map characters
  821. match(s1,s2,i1,i2) : i3            # match initial string
  822. member(X,x) : x                # test for membership
  823. mmout(x) : n                # write text to allocation history
  824. mmpause(s) : n                # write pause to allocation history
  825. mmshow(x,s) : n                # redraw in allocation history
  826. move(i) : s                # move scanning position
  827. name(x) : s                # produce name
  828. numeric(x) : N                # convert to numeric
  829. open(s1,s2) : f                # open file
  830. ord(s) : i                # produce ordinal
  831. pop(L) : x                # pop from list
  832. pos(i1) : i2                # test scanning position
  833. proc(x,i) : p                # convert to procedure
  834. pull(L) : x                # pull from list
  835. push(L,x) : L                # push onto list
  836. put(L,x) : L                # put onto list
  837. read(f) : s                # read line
  838. reads(f,i) : s                # read string
  839. real(x) : r                # convert to real
  840. remove(s) : n                # remove file
  841. rename(s1,s2) : n            # rename file
  842. repl(s1,i) : s2                # replicate string
  843. reverse(s1) : s2            # reverse string
  844. right(s1,i,s2) : s3            # position string at right
  845. rtod(r1) : r2                # convert radians to degrees
  846. runerr(i,x)                # terminate with run-time error
  847. save(s) : i                # save executable image
  848. seek(f,i) : f                # seek to position in file
  849. seq(i1,i2) : i3,i4,...            # generate sequence of integers
  850. set(L) : S                # create set
  851. sin(r1) : r2                # compute sine
  852. sort(X,i) : L                # sort structure
  853. sortf(X,i) : L                # sort list or set by field
  854. sqrt(r1) : r2                # compute square root
  855. stop(x1,x2,...,xn)            # stop execution
  856. string(x) : s                # convert to string
  857. system(s) : i                # call system function
  858. tab(i) : s                # set scanning position
  859. table(x) : T                # create table
  860. tan(r1) : r2                # compute tangent
  861. trim(s1,c) : s2                # trim string
  862. type(x) : s                # produce type name
  863. upto(c,s,i1,i2) : i3,i4,...,in        # locate characters
  864. variable(s) : x                # produce variable
  865. where(f) : i                # produce position in file
  866. write(x1,x2,...,xn) : xn        # write line
  867. writes(x1,x2,...,xn)            # write string
  868. -
  869. Operations and required datatypes
  870.  
  871. prefix operations
  872.  
  873.     +N : N            # compute positive
  874.     -N : N            # compute negative
  875.     ~c1 : c2            # compute cset complement
  876.     =s1 : s2            # match string in scanning
  877.     @C : x            # activate co-expression
  878.     ^C1 : C2            # create refreshed co-expression
  879.     *x : i            # compute size
  880.     ?x1 : x2            # generate random value
  881.     !x : x1,x2,...,xn        # generate values
  882.     /x : x            # check for null value
  883.     \x : x            # check for non-null value
  884.     .x : x            # dereference variable
  885.  
  886. infix operations
  887.  
  888.     N1 + N2 : N3        # compute sum
  889.     N1 - N2 : N3        # compute difference
  890.     N1 * N2 : N3        # compute product
  891.     N1 / N2 : N3        # compute quotient
  892.     N1 % N2 : N3        # compute remainder
  893.     N1 ^ N2 : N3        # compute exponential
  894.     x1 ++ x2 : x3        # compute cset or set union
  895.     x1 -- x2 : x3        # compute cset or set difference
  896.     x1 ** x2 : x3        # compute cset or set intersection
  897.     s1 || s2 : s3        # concatenate strings
  898.     L1 ||| L2 : L3        # concatenate lists
  899.     R.F : x            # get field of record
  900.     x1 @ C : x2            # transmission value to co-expression
  901.     x1 & x2 : x2        # evaluate in conjunction
  902.     N1 < N2 : N2        # compare numerically
  903.     N1 <= N2 : N2        # "
  904.     N1 = N2 : N2        # "
  905.     N1 >= N2 : N2        # "
  906.     N1 > N2 : N2        # "
  907.     N1 ~= N2 : N2        # "
  908.     s1 << s2 : s2        # compare lexically
  909.     s1 <<= s2 : s2        # "
  910.     s1 == s2 : s2        # "
  911.     s1 >>= s2 : s2        # "
  912.     s1 >> s2 : s2        # "
  913.     s1 ~== s2 : s2        # "
  914.     x1 === x2 : x2        # compare values
  915.     x1 ~=== x2 : x2        # "
  916.     x1 := x2 : x1        # assign value
  917.     x1 op:= x2 : x1        # augmented assignment
  918.     x1 :=: x2 : x1        # exchange values
  919.     x1 <- x2 : x1        # assign value reversibly
  920.     x1 <-> x2 : x1        # exchange values reversibly
  921. -
  922. Keywords
  923.  
  924.     &allocated : i1,i2,i3,i4    # accumulated bytes allocated
  925.                 # (total,static,string,block)
  926.     &ascii : c            # cset of ascii characters
  927.     &clock : s            # current time of day
  928.     &collections : i1,i2,i3,i4    # collection count
  929.                 # (total,static,string,block)
  930.     &cset : c            # cset of all characters
  931.     ¤t : C        # current co-expression
  932.     &date : s            # current date
  933.     &dateline : s        # current date and time
  934.     &digits : c            # cset of digits 0-9
  935.     &e : r            # base of natural logarithms, 2.71828...
  936.     &error : i            # run-time error conversion control
  937.     &errornumber : i        # run-time error number
  938.     &errortext : s        # run-time error message text
  939.     &errorvalue    : x        # run-time error offending value
  940.     &errout : f            # standard error output file
  941.     &fail            # fails
  942.     &features : s1,s2,...,sn    # implementation features
  943.     &file : s            # current source code file name
  944.     &host : s            # string identifying host computer
  945.     &input : f            # standard input file
  946.     &lcase : c            # cset of lower case letters a-z
  947.     &letters : c        # cset of all letters A-Za-z
  948.     &level : i            # level of current procedure call
  949.     &line : i            # current source code line number
  950.     &main : C            # main co-expression
  951.     &null : n            # the null value
  952.     &output : f            # standard output file
  953.     &phi : r            # The golden ratio, 1.61803...
  954.     &pi : r            # The value of pi, 3.14159...
  955.     &pos : i            # string scanning position
  956.     &random : i            # random number seed
  957.     ®ions : i1,i2,i3        # current region size
  958.                 # (static,string,block)
  959.     &source : C            # activator of current co-expression
  960.     &storage : i1,i2,i3        # current bytes allocated
  961.                 # (static,string,block)
  962.     &subject : s        # string scanning subject
  963.     &time : i            # current run time in milliseconds
  964.     &trace : i            # procedure tracing control
  965.     &ucase : c            # cset of upper case letters A-Z
  966.     &version : s        # version of Icon
  967. -
  968. Datatypes
  969.  
  970.     null(n)    string(s)  co-expression(C)  table(T)
  971.     integer(i)    cset(c)       procedure(p)      set(S)
  972.     real(r)    file(f)       list(L)         <record types>(R)
  973.  
  974.     (see also "Abbreviations")
  975. -
  976. Reserved words
  977.  
  978.     break    do        global    next        repeat    to
  979.     by        else        if        not        return    until
  980.     case    end        initial    of        static    while
  981.     create    every        link    procedure   suspend
  982.     default    fail        local    record        then
  983. -
  984. Escapes in string and cset constants
  985.  
  986.     \b        backspace            \v    vertical tab
  987.     \d        delete(rubout)        \'    single quote
  988.     \e        escape (altmode)        \"    double quote
  989.     \f        formfeed            \\    backslash
  990.     \l        linefeed (newline)        \ddd    octal code
  991.     \n        newline (linefeed)        \xdd    hexadecimal code
  992.     \r        carriage return        \^c    control code
  993.     \t        horizontal tab
  994. -
  995. Abbreviations used in Icon help files (and other Icon literature)
  996.  
  997.     c    cset        C    co-expression
  998.     f    file        L    list
  999.     i    integer        N    numeric (i or r)
  1000.     n    null        R    record (any record type)
  1001.     p    procedure    S    set
  1002.     r    real        T    table
  1003.     s    string        X    any structure type (L, R, S, or T)
  1004.     x    any type    F    field of record
  1005. -
  1006. About the Icon Programming Language Help File
  1007.  
  1008. Information used in this help file was obtained from the following
  1009. sources:
  1010.  
  1011. Griswold, Ralph E. and Madge T. Griswold.  "The Icon Programming
  1012. Language, Second Edition", Prentice-Hall, Inc., Englewood Cliffs, New
  1013. Jersey.  1990.
  1014.  
  1015. Griswold, Ralph E.  ICONT(1), manual page for "UNIX Programmer's
  1016. Manual", Department of Computer Science, The University of Arizona.
  1017. 1988.
  1018.  
  1019. Griswold, Ralph  E., Clinton L. Jeffery, Gregg M. Townsend, and
  1020. Kenneth Walker.  "Version 8.6 of the Icon Programming Language",
  1021. IPD188, Department of Computer Science, The University of Arizona.
  1022. 1992.
  1023.  
  1024. Further information on the Icon Programming Language can be obtained
  1025. from:
  1026.  
  1027.     Icon Project
  1028.     Department of Computer Science
  1029.     Gould-Simpson Building
  1030.     The University of Arizona
  1031.     Tucson, Arizona  85721
  1032.     U.S.A.
  1033.     (602) 621-2018
  1034.     icon-project@cs.arizona.edu            (Internet)
  1035.     ...{uunet,allegra,noao}!arizona!icon-project    (uucpnet)
  1036.  
  1037. April 2, 1992.
  1038.